<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"   
      xmlns:jb="http://java.sun.com/jsf/composite/componentes"
      xmlns:p="http://primefaces.org/ui">

    <SCRIPT language="JavaScript" type="text/javascript">
                   
        function handleRequestTurno(xhr, status, args) {                     
            if(args.validationFailed || !args.CallbackParam) {  
     
            } else {                              
                carDialogTurno.hide();  
                jQuery('#btnGuardarTurno').fadeOut();  
            }  
        }  
    </SCRIPT>
    <h:form onsubmit="return checkSubmit();"  id="frmTurno">
        <h:panelGrid id="pgFormDtoTurno" frame="box">
            <h:panelGrid  columns="4" cellpadding="4">
                
                <h:outputLabel styleClass="label" value="#{i18n['form.control.critico.turno']}"/>                    
                <p:selectOneMenu value="#{controlCriticoMBean.detaTurnoDto.turno}"
                                 style="#{applicationMBean.estiloObligatorio}"
                                 disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}">
                    <f:selectItems value="#{controlCriticoMBean.listaTurnos}"/>
                </p:selectOneMenu>
                
                <h:outputLabel for="itComienzo" value="#{i18n['form.control.critico.comienzo']}" styleClass="label"/>
                <p:inputText id="itComienzo" label="#{i18n['form.control.critico.comienzo']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{controlCriticoMBean.detaTurnoDto.comienzo}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('entero',this)"
                             required="true" size="10">
                    <f:validateLength minimum="1" maximum="9"/>                   
                </p:inputText>
                
                <h:outputLabel for="itFin" value="#{i18n['form.control.critico.fin']}" styleClass="label"/>
                <p:inputText id="itFin" label="#{i18n['form.control.critico.fin']}" style="#{applicationMBean.estiloObligatorio}"
                             value="#{controlCriticoMBean.detaTurnoDto.fin}"  readonly="#{sessionMBean.accionDetalle == applicationMBean.ver}"
                             onkeypress="return fn_validaTecla('entero',this)"
                             required="true" size="10">
                    <f:validateLength minimum="1" maximum="9"/>                   
                </p:inputText>                                               
                
                <h:outputLabel styleClass="label" value="#{i18n['general.label.activo']}"/>
                <p:selectBooleanCheckbox value="#{controlCriticoMBean.detaTurnoDto.estado}"  style="#{applicationMBean.estilo}"  disabled="#{sessionMBean.accionDetalle == applicationMBean.ver}"/>
                
            </h:panelGrid>            
        
            <p:panel id="pnlAcciones" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}">
                <h:panelGrid columns="10">
                    <p:commandButton id="btnGuardarTurno" update=":msjDialogTurno,:frmPrincipal:tabPrincCC,:msgs" 
                                     title="#{i18n['general.button.guardar.tip']}"
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     ajax="true"                                 
                                     icon="ui-icon ui-icon-disk" rendered="#{sessionMBean.accionDetalle != applicationMBean.ver}"
                                     value="#{i18n['general.button.guardar']}" 
                                     action="#{controlCriticoMBean.guardarTurno}"
                                     oncomplete="handleRequestTurno(xhr, status, args);"
                                     >
                    </p:commandButton>
                </h:panelGrid>
            </p:panel>
        </h:panelGrid>  
    </h:form>
</html>